﻿<%@ include file="/WEB-INF/work/start.jspf"%>
<html>
<head>
<%@ include file="/WEB-INF/jspf/meta.jspf"%>
<title>签到/签退</title>
<%@ include file="/WEB-INF/jspf/css.jspf" %>
</head>
<body>
<jsp:include page="/WEB-INF/jspf/menu.jsp">
    <jsp:param name="current" value="work" />
</jsp:include>
<c:set value="${param.action}" var="action" />
<c:choose>
<c:when test="${action == 'enroll'}">
	<sql:update>
		insert into workdaily_enroll(id,)
	</sql:update>
</c:when>
<c:when test="${action =='enroll-out'}">
</c:when>
</c:choose>
<div class="container theme-showcase" role="main">
<a href="#" class="pure-button btn btn-primary">签到</a> <a class="pure-button btn btn-default" href="#">签退</a>
<hr />
<table class="pure-table pure-table-bordered table table-bordered">
	<thead>
		<tr>
			<th>人员</th>
			<th>签到日期</th>
			<th>签退日期</th>
		</tr>
	</thead>
	<tbody>
		<sql:query var="items" dataSource="${ work }">
			select a.*,b.username from workdaily_enroll a inner join auth_user b on a.enroll_by_id=b.id  order by a.created_at desc
		</sql:query>
		<c:forEach var="row" items="${items.rows}" varStatus="status">
			<tr class="<c:if test="${status.index%2==0}"><c:out value="odd" /></c:if>">
			<td><c:out value="${row.username}" /></td>
			<td><fmt:formatDate value="${row.created_at}" pattern="MM-d, H:mm"/></td>
			<td><fmt:formatDate value="${row.enroll_out_at}" pattern="MM-d, H:mm"/></td>
			</tr>
		</c:forEach>
	</tbody>
</table>
</div>
</body>
</html>